import * as React from "react";
interface IIcon {
    icon:string,
    color?:string,
    size?:number
}

export  default  class Icon extends React.Component<IIcon, any>{
    constructor(props:IIcon) {
        super(props);
    }

    render(){
        const iconName= this.props.icon;
        const size = this.props.size || 14;
        const color = this.props.color || "#000";
        return <i className={`ma-icon iconfont icon-${iconName}`} style={{fontSize:`${size}px`, color}}/>
    }
}
